← Back
Editing: index-legacy364.js
!function(){function e(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var n,r,o="function"==typeof Symbol?Symbol:{},u=o.iterator||"@@iterator",a=o.toStringTag||"@@toStringTag";function l(e,o,u,a){var l=o&&o.prototype instanceof c?o:c,s=Object.create(l.prototype);return t(s,"_invoke",function(e,t,o){var u,a,l,c=0,s=o||[],p=!1,f={p:0,n:0,v:n,a:v,f:v.bind(n,4),d:function(e,t){return u=e,a=0,l=n,f.n=t,i}};function v(e,t){for(a=e,l=t,r=0;!p&&c&&!o&&r<s.length;r++){var o,u=s[r],v=f.p,d=u[2];e>3?(o=d===t)&&(l=u[(a=u[4])?5:(a=3,3)],u[4]=u[5]=n):u[0]<=v&&((o=e<2&&v<u[1])?(a=0,f.v=t,f.n=u[1]):v<d&&(o=e<3||u[0]>t||t>d)&&(u[4]=e,u[5]=t,f.n=d,a=0))}if(o||e>1)return i;throw p=!0,t}return function(o,s,d){if(c>1)throw TypeError("Generator is already running");for(p&&1===s&&v(s,d),a=s,l=d;(r=a<2?n:l)||!p;){u||(a?a<3?(a>1&&(f.n=-1),v(a,l)):f.n=l:f.v=l);try{if(c=2,u){if(a||(o="next"),r=u[o]){if(!(r=r.call(u,l)))throw TypeError("iterator result is not an object");if(!r.done)return r;l=r.value,a<2&&(a=0)}else 1===a&&(r=u.return)&&r.call(u),a<2&&(l=TypeError("The iterator does not provide a '"+o+"' method"),a=1);u=n}else if((r=(p=f.n<0)?l:e.call(t,f))!==i)break}catch(r){u=n,a=1,l=r}finally{c=1}}return{value:r,done:p}}}(e,u,a),!0),s}var i={};function c(){}function s(){}function p(){}r=Object.getPrototypeOf;var f=[][u]?r(r([][u]())):(t(r={},u,function(){return this}),r),v=p.prototype=c.prototype=Object.create(f);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,t(e,a,"GeneratorFunction")),e.prototype=Object.create(v),e}return s.prototype=p,t(v,"constructor",p),t(p,"constructor",s),s.displayName="GeneratorFunction",t(p,a,"GeneratorFunction"),t(v),t(v,a,"Generator"),t(v,u,function(){return this}),t(v,"toString",function(){return"[object Generator]"}),(e=function(){return{w:l,m:d}})()}function t(e,n,r,o){var u=Object.defineProperty;try{u({},"",{})}catch(e){u=0}t=function(e,n,r,o){function a(n,r){t(e,n,function(e){return this._invoke(n,r,e)})}n?u?u(e,n,{value:r,enumerable:!o,configurable:!o,writable:!o}):e[n]=r:(a("next",0),a("throw",1),a("return",2))},t(e,n,r,o)}function n(e,t,n,r,o,u,a){try{var l=e[u](a),i=l.value}catch(e){return void n(e)}l.done?t(i):Promise.resolve(i).then(r,o)}function r(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}System.register(["./utils-lib-legacy.js?v=1765440387","./base-lib-legacy.js?v=1765440387","./form-item-legacy.js?v=1765440387","./index-legacy75.js?v=1765440387","./__commonjsHelpers__-legacy.js?v=1765440387","./index-legacy94.js?v=1765440387","./index-legacy93.js?v=1765440387","./index.vue_vue_type_script_setup_true_lang-legacy6.js?v=1765440387","./index-legacy120.js?v=1765440387","./validator-legacy.js?v=1765440387","./column-legacy.js?v=1765440387","./index.vue_vue_type_style_index_0_scoped_b3c4124c_lang-legacy.js?v=1765440387","./useStore-legacy3.js?v=1765440387","./site-legacy.js?v=1765440387","./index-legacy121.js?v=1765440387","./index-legacy131.js?v=1765440387","./index-legacy114.js?v=1765440387","./useController-legacy6.js?v=1765440387"],function(t,o){"use strict";var u,a,l,i,c,s,p,f,v,d,m,y,g,b,w,h,_,j,x,P,T;return{setters:[function(e){u=e.u,a=e.G,l=e.j,i=e.bT,c=e.bg,s=e.bU,p=e.bV},function(e){f=e.c,v=e.r,d=e.t,m=e.g,y=e.e,g=e.ay,b=e.B,w=e.p,h=e.q,_=e.M,j=e.x},function(e){x=e.k},function(e){P=e.a,T=e.o},null,null,null,null,null,null,null,null,null,null,null,null,null,null],execute:function(){t("default",f({__name:"index",setup:function(t,o){var f,F,O=o.expose,S=v(!1),k=u().panel,A=d(k.value).sitePath,E=m(function(){var e;return A.value?null===(e=A.value+"/")||void 0===e?void 0:e.replace(/\/\//g,"/"):"/www/wwwroot/"}),G=v({webname:"",path:"/www/wwwroot",ftp:!1,ps:"",port:80,ftp_username:"",ftp_password:""}),V=a({data:G.value,options:function(e){return m(function(){return e.value.hasOwnProperty("ftp")||(e.value.ftp=!1),[{type:"custom",render:function(t){return t.value.hasOwnProperty("webname")||(t.value.webname=""),y(c,{label:"绑定域名",prop:"webname"},{default:function(){return[y(g,{ref:"popover",placement:"top-start","popper-class":"green-tips-popover !p-0",title:"",width:"370",visible:S.value,"onUpdate:visible":function(e){return S.value=e},"trigger-keys":[],trigger:"focus"},{default:function(){return y("div",{class:"!p-[12px] bg-[#20a53a] text-white"},[b("如需填写多个域名,请换行填写,每行一个域名,默认为80端口"),y("br",null,null),b("IP地址格式:192.168.1.199"),y("br",null,null),b("泛解析添加方法 *.domain.com"),y("br",null,null),b("如另加端口格式为 www.domain.com:88")])},reference:function(){return y(l,{rows:6,resize:"none",width:"42rem",modelValue:e.value.webname,"onUpdate:modelValue":function(t){return e.value.webname=t},onInput:function(t){var n,r,o;"string"==typeof t&&(e.value.ps=t.split("\n")[0],e.value.path=(null===(n=E.value)||void 0===n?void 0:n.replace(/\/\//g,"/"))+(null===(r=t.split("\n")[0])||void 0===r||null===(r=r.replace(/:/g,"_"))||void 0===r?void 0:r.trim()),e.value.ftp_username=null===(o=t.split("\n")[0])||void 0===o||null===(o=o.toString())||void 0===o?void 0:o.replace(/\W/g,"_").substring(0,16),e.value.ftp_password=i(12))},onFocus:function(){S.value=!0},type:"textarea",placeholder:"如需填写多个域名,请换行填写,每行一个域名,默认为80端口\nIP地址格式:192.168.1.199\n泛解析添加方法 *.domain.com\n如另加端口格式为 www.domain.com:88"},null)}})]}})},key:"webname",rules:{webname:[s({message:"请输入域名",trigger:"blur"}),p()]}},{type:"input",label:"备注",key:"ps",attrs:{placeholder:"请输入备注,可为空",width:"42rem"}},x("根目录","path",{attrs:{width:"42rem",placeholder:"请输入根目录"},rules:[s({message:"请选择路径"})]},function(){T(e.value.path,function(t){e.value.path=t})}),{type:"select",label:"FTP",key:"ftp",options:[{label:"不创建",value:!1},{label:"创建",value:!0}],attrs:{style:"width: 16rem;"}}].concat(r(e.value.ftp?[{type:"custom",render:function(t){return t.value.hasOwnProperty("ftp_username")||(t.value.ftp_username="",t.value.ftp_password=""),y(c,{label:"FTP账号"},{default:function(){return[y("div",{class:"flex items-center mb-[12px]"},[y(c,{prop:"ftp_username"},{default:function(){return[y(l,{placeholder:"创建FTP账号",width:"16rem",modelValue:e.value.ftp_username,"onUpdate:modelValue":function(t){return e.value.ftp_username=t}},null)]}}),y(c,{label:"密码",class:"!mt-0",prop:"ftp_password"},{default:function(){return[y(l,{width:"16rem",placeholder:"FTP密码",modelValue:e.value.ftp_password,"onUpdate:modelValue":function(t){return e.value.ftp_password=t}},null)]}})]),y("span",{class:"text-[#999] text-[1.2rem]"},[b("创建站点的同时,为站点创建一个对应FTP帐户,并且FTP目录指向站点所在目录。")])]}})},rules:{ftp_username:[{validator:function(t,n,r){e.value.ftp?0===n.length?r(new Error("FTP用户名不能为空!")):/^[a-zA-Z0-9_]+$/g.test(n)?n.length<=3?r(new Error("FTP用户名长度错误,不能少于3个字符!")):r():r(new Error("FTP用户名只能包含字母、数字和下划线!")):r()},trigger:["blur","change"]}],ftp_password:[{validator:function(t,n,r){""===n&&e.value.ftp?r(new Error("FTP密码不能为空!")):r()},trigger:["blur","change"]}]}}]:[]))})},submit:(f=e().m(function t(n,r){return e().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,r();case 1:return e.n=2,P(n.value);case 2:return e.a(2,e.v)}},t)}),F=function(){var e=this,t=arguments;return new Promise(function(r,o){var u=f.apply(e,t);function a(e){n(u,r,o,a,l,"next",e)}function l(e){n(u,r,o,a,l,"throw",e)}a(void 0)})},function(e,t){return F.apply(this,arguments)})}),I=V.BtForm,U=V.submit;return w(function(){A.value&&Object.assign(G.value,{path:A.value})}),O({onConfirm:U}),function(e,t){return h(),_(j(I),{class:"p-2rem"})}}}))}}})}();
Save File
Cancel